import QtQuick 2.0

Item {
    id:root

    property bool selected: false
    property url source
    property url selectedSource

    signal clicked
    Image{
        id:image

        fillMode: Image.PreserveAspectFit
        source: selected ? root.selectedSource : root.source
    }
    MouseArea{
        anchors.fill: parent
        id:mouseArea
        onClicked: {
            root.clicked()
        }
    }
}
